home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / profil.man < prev    next >
Encoding:
Text File  |  1989-02-09  |  2.0 KB  |  67 lines

  1.  
  2.  
  3.  
  4. PROFIL                C Library Procedures                 PROFIL
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      profil - execution time profile
  10.  
  11. SSYYNNOOPPSSIISS
  12.      pprrooffiill((bbuuffff,, bbuuffssiizz,, ooffffsseett,, ssccaallee))
  13.      cchhaarr **bbuuffff;;
  14.      iinntt bbuuffssiizz,, ooffffsseett,, ssccaallee;;
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      pprrooffiill(()) enables run-time execution profiling, and reserves
  18.      a buffer for maintaining raw profiling statistics.  _b_u_f_f
  19.      points to an area of core of length _b_u_f_s_i_z (in bytes).
  20.      After the call to pprrooffiill, the user's program counter (pc) is
  21.      examined at each clock tick (10 milliseconds on Sun-4 sys-
  22.      tems, 20 milliseconds on Sun-2 and Sun-3 systems); _o_f_f_s_e_t is
  23.      subtracted from its value, and the result multiplied by
  24.      _s_c_a_l_e.  If the resulting number corresponds to a word within
  25.      the buffer, that word is incremented.
  26.  
  27.      _s_c_a_l_e is interpreted as an unsigned, fixed-point fraction
  28.      with binary point at the left: 0x10000 gives a 1-to-1 map-
  29.      ping of pc values to words in _b_u_f_f; 0x8000 maps each pair of
  30.      instruction words together.  0x2 maps all instructions onto
  31.      the beginning of _b_u_f_f (producing a non-interrupting core
  32.      clock).
  33.  
  34.      Profiling is turned off by giving a _s_c_a_l_e of 0 or 1.  It is
  35.      rendered ineffective by giving a _b_u_f_s_i_z of 0.  Profiling is
  36.      turned off when an eexxeeccvvee(()) is executed, but remains on in
  37.      child and parent both after a ffoorrkk(()).  Profiling is turned
  38.      off if an update in _b_u_f_f would cause a memory fault.
  39.  
  40. RREETTUURRNN VVAALLUUEE
  41.      A 0, indicating success, is always returned.
  42.  
  43. SSEEEE AALLSSOO
  44.      ggpprrooff(1), ggeettiittiimmeerr(2), mmoonniittoorr(3)
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0              27 January 1988                        1
  64.  
  65.  
  66.  
  67.